package com.zj.jdbc2ThreadLocal;


public enum SingletonEnum {

    //创建一个枚举对象，该对象天生为单例
    INSTANCE;
    private UserDaoImpl userDao;
    private JdbcService service;
    //私有化枚举的构造函数
    private SingletonEnum(){
        userDao=new UserDaoImpl();
        service=new JdbcService();
    }
    public UserDaoImpl getUserDao(){
        return userDao;
    }
    public JdbcService getJdbcService(){
        return service;
    }
}
